﻿using System;
using System.Collections.Generic;
using System.Text;
using UtilZ.Dotnet.Ex.Base;

namespace UtilZ.Dotnet.Ex.Model
{
    /// <summary>
    /// 序列器化提供者基类
    /// </summary>
    public abstract class SerializeProviderAbs : ISerializeProvider
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public SerializeProviderAbs()
        {

        }



        /// <summary>
        /// 获取序列化器对象
        /// </summary>
        /// <param name="serializeType">序列化类型</param>
        /// <returns>序列化器</returns>
        public ISerializer GetSerializer(string serializeType)
        {
            return this.PrimitiveGetSerializer(serializeType);
        }


        /// <summary>
        /// 获取序列器对象
        /// </summary>
        /// <param name="serializeType">序列化类型</param>
        /// <returns>序列化器</returns>
        protected abstract ISerializer PrimitiveGetSerializer(string serializeType);

    }
}
